package com.service.impl;

import java.util.Date;

public class MemberService implements IMmeberService{
	IMemberDao memberDao = new MemberDao()；

		public Member getMember(Integer id){
		return memberDao.get(id);
	}
	
	public Member getMember(String openId){
		return memberDao.get(openId);
	}
	
	public Integer addMember(Member member){
		user.setAddDate(new Date());
		return memberDao.save(member);
	}
	
	public void delMember(Integer id){
		memberDao.delete(id);
	}
	
	public void delMember(String openId){
		memberDao.delete(openId);
	}
	
	public void updateMember(Member member){
		memberao.update(member);
	}
	
	public List<Member> listMember(){
		return memberDao.findAll();
	}
	
	public IMemberDao getMemberDao() {
		return memberDao;
	}

	public void setMemberDao(IMemberDao memberDao) {
		this.memberDao = memberDao;
	}
}
